1. Field of the Invention
This invention relates to an information processing device which is disposed at the lens unit of a camera or the like and which is arranged to obtain from the outside, for example, such information that is necessary for focus control (focal length information); to determine a data storing address on a ROM on the basis of the information; to read out, from the address, data to be used for the focus control; and to supply the data to a signal processing system which is disposed on the side of the camera body.
2. Description of the Related Related Art
Data concerning a focal length, a full aperture value, etc. used for the exposure control, focus control, etc. of a camera varies with a focal length selected in cases where a zoom lens is used. Even in the case of a monofocal lens, the data varies accordingly as a photo taking distance (an amount of lens delivery) varies. Therefore, every time the data is required for computation and control, the state of a switch which consists of a code plate and a brush or the like secured to a lens barrel or the like and which indicates a currently selected focal length or an amount of lens delivery, is read out; then an address on a ROM in which data corresponding to the state of the switch has been stored is determined; and the data is read out from the address to be used for computation and control.
The flow of the above-stated operation of the conventional arrangement for reading out data from the ROM is as described below with reference to FIGS. 5 to 8 of the accompanying drawings.
Referring to FIG. 5, a core part (CPU) 1 of a microcomputer is provided with four-bit general-purpose registers A and E which are not shown. The illustration includes a RAM 2; a ROM 3 having a program and data written therein; a buffer part 4 which is provided for serial communication between a lens unit and a camera body; a CPU 5 which is disposed on the side of the camera body; an address bus "a" which indicates addresses on the RAM 2; a data bus "b" which is provided for making reference to data of the RAM 2; an address bus "c" which indicates addresses on the ROM 3; a data bus "d" which is provided for making reference to data or a program of the ROM 3; a clock line "e" which is provided for synchronizing the serial communication between the lens unit and the camera body by transmitting a synchronizing clock pulse which is shown in FIG. 6; a serial data line "f" which is provided for transmitting a command or data from the camera body to the lens unit, as shown in FIG. 6; and a serial data line "g" which is provided for transmitting information on the state of the lens unit and data from the lens unit to the camera body, as shown in FIG. 6.
Five-bit switches SW0 to SW4 are arranged to indicate a focal length. A one-bit switch SW5 is arranged to permit a selection of the photographing mode of the camera between a macro photographing mode and a non-macro photographing mode. Two-bit switches SW6 and SW7 are arranged to indicate whether an extender lens is mounted or not mounted and to indicate the kind of the extender lens if it is mounted. Four-bit switches SW8 to SW11 are provided for correcting any deviation from the best focus position due to a manufacturing error. These switches SW0 to SW11 are connected to input ports of the CPU 1 for every four bits. The switches SW0 to SW3 are connected to an input port PORT0, the switches SW4 to SW7 to an input port PORT1 and the switches SW8 to SW11 to another input port PORT2, respectively.
In reading out, from an address on the ROM 3 which is, for example, 1000 H (wherein H is used to indicate a hexadecimal number), a focal length data of two bytes which is set by means of the five-bit focal length switches SW0 to SW4 and the two-bit extender switches SW6 and SW7, the conventional device which is arranged as described above performs this reading action as follows.
Referring to FIG. 7, the focal length data of two bytes which corresponds to the alignment of the switches SW0 to SW4, SW6 and SW7 is stored in an area of 256 bytes. Therefore, in reading out data from the ROM 3, the alignment of the switches SW0 to SW4, SW6 and SW7 read at the input ports PORT0 and PORT1 shown in FIG. 5 must be converted into a switch alignment as shown in FIG. 7. An example of this conversion is described below with reference to the flow chart of FIG. 8.
Step #21: States of the switches SW4 to SW7 are read out and taken into the register A (not shown) via the input port PORT1. Step #22: The content of the register A is shifted to the register E which is also not shown. This causes the register E to have the same data as the register A. Step #23: The register A is masked with "0001B", wherein B is used to indicate a binary number. This causes the content of the register A to become "0, 0, 0, SW4". Step #24: The contents of the registers A and E are exchanged with each other. Step #25: The content of the register A is shifted one bit to the right. This causes the content of the register A to become "0, SW7, SW6, SW5". Step #26: The register A is masked with "1110B". This causes the content of the register A to become "0, SW7, SW6, 0". Step #27: The logical sum of the contents of the registers E and A is substituted for the register E. That causes the content of the register E to become "0, SW7, SW6, SW4". Step #28: Information on the states of the switches SW0 to SW3 is read and taken into the register A via the input port PORT0. As a result, the contents of the registers E and A become "0, SW7, SW6, SW4, SW3, SW2, SW1, SW0". Step #29: The contents of the registers E and A are shifted one bit to the left. This causes the contents of the registers E and A to become "SW7, SW6, SW4, SW3, SW2, SW1, SW0, 0".
A computing operation for determining an address is completed through these steps. The flow of operation then proceeds to a step #30 for reading a data table provided on the ROM 3. At the step #30: Two bytes of higher position (10H) of a first address (1000H in this example) at which information on a focal length has been stored is substituted for a base register which is not shown. Data is read out as an offset from the first address on the basis of an address previously computed.
As apparent from the above description, the conventional device is arranged to read out information on the states of the switches at a point of time when data becomes necessary; then, an address at which the desired data on the ROM 3 has been stored is determined; and the data is read out from the address. However, this arrangement of the conventional device presents the following problems:
(i) The kinds and quantity of necessary lens data increase accordingly as a desired computation and a control over distance and light measuring actions become more complex. As a result, it becomes necessary to determine the address on the ROM 3 not merely by reading the states of the switches but also by performing a soft-ware process for shifting and rotating the states of the switches read out. The data of varied kinds is then repeatedly read out from a data table provided on the ROM 3 for distance or light measurement. In that instance, the length of processing time required for determining the address by the soft-ware process becomes too long to attain a high speed computing operation.
(ii) In the case of a camera which is capable of setting a focal length by turning a zoom ring, if the camera is arranged to divide a distance between telephoto and wide-angle positions into 32 parts by means of five-bit focal length switches, the switch position changes once for every 30 msec or thereabout when the distance is completely covered by turning the zoom ring in one second. Therefore, even if a computing operation is performed at every one msec, the switch position changes only once while the computing operation is performed 30 times. Further, a high speed computing operation is hindered also to a great degree by the arrangement to determine the address every time a data reading is required in cases where the camera includes such a switch as an extender lens switch the position of which never changes after an extender lens is mounted until a power supply from the camera body is turned off with the extender lens removed for replacing it with another lens or a manufacturing error correction switch the position of which never changes after adjustment is made during the camera manufacturing process.